<?php
$dt = new DataTable(constant('DB_TABLE_EPAPER_CONTENT'));
$act = isset($_REQUEST['act'])?$_REQUEST['act']:'';
if (  $act == 'delete' ) {
	$dt->remove($_REQUEST['id']);
}
$condition = "";

$page = isset($_REQUEST['page'])?$_REQUEST['page']:1;
$page_size = isset($_REQUEST['page_size'])?$_REQUEST['page_size']:10;
$offset = $page_size * ( $page - 1);
$GLOBALS['PAGE_LIST_DATA'] = $dt->get_list($condition, array('-date','-id'), $page_size, $offset);
$total_row =  $dt->get_count($condition);
$GLOBALS['PAGE_LIST_TOTAL_PAGE'] = ceil($total_row/$page_size);
$GLOBALS['PAGE_LIST_PAGE'] = $page;
$_REQUEST['page'] = $page;
?>